home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 008a / xmsif140.zip / XMSIF.H < prev    next >
C/C++ Source or Header  |  1991-12-08  |  4KB  |  147 lines

  1. /***************************************************************************
  2. *   XMSIF.H                                                                *
  3. *   HEADER FOR XMSIF                                                       *
  4. *   OS:        DOS                                                         *
  5. *   VERSION:   1.4                                                         *
  6. *   DATE:      12/08/91                                                    *
  7. *                                                                          *
  8. *   Copyright (c) 1991 James W. Birdsall. All Rights Reserved.             *
  9. *                                                                          *
  10. ***************************************************************************/
  11.  
  12. #ifndef XMSIF_H
  13. #define XMSIF_H
  14.  
  15. /*
  16. ** system includes <>
  17. */
  18.  
  19. /*
  20. ** custom includes ""
  21. */
  22.  
  23. /*
  24. ** local #defines
  25. */
  26.  
  27. /* error returns */
  28.  
  29. #define XMMOOPS     -1
  30. #define NOXMM       -2
  31.  
  32.  
  33. /* XMM library errors */
  34.  
  35. #define XMM_NOINIT          0x40
  36. #define XMM_UMBHUGE         0x41
  37. #define XMM_BADPTR          0x42
  38. #define XMM_ELTOOBIG        0x43
  39. #define XMM_SKTOOBIG        0x44
  40.  
  41.  
  42. /* XMS driver errors */
  43.  
  44. #define XMM_UNIMP           0x80
  45. #define XMM_VDISK           0x81
  46. #define XMM_A20ERROR        0x82
  47. #define XMM_GENERROR        0x8E
  48. #define XMM_UNRECERROR      0x8F
  49.  
  50. #define XMM_NOHMA           0x90
  51. #define XMM_HMAUSED         0x91
  52. #define XMM_HMATOOBIG       0x92
  53. #define XMM_HMANOALLOC      0x93
  54. #define XMM_A20STILLEN      0x94
  55.  
  56. #define XMM_NOFREEX         0xA0
  57. #define XMM_NOFREEXHAN      0xA1
  58. #define XMM_BADXHAN         0xA2
  59. #define XMM_BADSRCHAN       0xA3
  60. #define XMM_BADSRCOFF       0xA4
  61. #define XMM_BADDESTHAN      0xA5
  62. #define XMM_BADDESTOFF      0xA6
  63. #define XMM_BADLENGTH       0xA7
  64. #define XMM_COPYOVERLAP     0xA8
  65. #define XMM_PARITY          0xA9
  66. #define XMM_NOLOCK          0xAA
  67. #define XMM_LOCKED          0xAB
  68. #define XMM_TOOMANYLOCKS    0xAC
  69. #define XMM_LOCKFAIL        0xAD
  70.  
  71. #define XMM_UMBSMALLER      0xB0
  72. #define XMM_NOFREEUMB       0xB1
  73. #define XMM_BADUMBHAN       0xB2
  74.  
  75.  
  76. /* function macros */
  77.  
  78. #define XMMcopyto(clen,src,dhan,doff)    _XMMcopy((clen),0, \
  79.                                             (unsigned long)(src),(dhan),(doff))
  80. #define XMMcopyfrom(clen,shan,soff,dest) _XMMcopy((clen),(shan),(soff),0, \
  81.                                                          (unsigned long)(dest))
  82.  
  83. #define XMMicopyto(n,e,b,s,h,f)          _XMMicopy((n),(e),(b),0, \
  84.                                                 (unsigned long)(s),(h),(f),(b))
  85. #define XMMicopyfrom(n,e,b,h,f,d)        _XMMicopy((n),(e),(b),(h),(f),0, \
  86.                                                         (unsigned long)(d),(b))
  87.  
  88.  
  89. /*
  90. ** misc: copyright strings, version macros, etc.
  91. */
  92.  
  93. /*
  94. ** typedefs
  95. */
  96.  
  97. struct XMMregs {
  98.     unsigned int regAX;
  99.     unsigned int regBX;
  100.     unsigned int regDX;
  101.     unsigned int regSI;
  102.     unsigned int regDS;
  103. };
  104.  
  105.  
  106. /*
  107. ** global variables
  108. */
  109.  
  110. extern unsigned char const _XMMerror;         /* XMS error variable */
  111. extern unsigned int  const _XMMversion;       /* XMS version, BCD */
  112.  
  113. extern char const xmsif_vers_vers[];
  114. extern char const xmsif_vers_date[];
  115. extern char const xmsif_vers_time[];
  116.  
  117.  
  118. /*
  119. ** function prototypes
  120. */
  121.  
  122. extern int XMMlibinit(void);
  123. extern unsigned int XMMgetversion(void);
  124.  
  125. extern unsigned long XMMcoreleft(void);
  126. extern unsigned long XMMallcoreleft(void);
  127.  
  128. extern int XMMalloc(unsigned long bytes);
  129. extern int XMMfree(int handle);
  130.  
  131. extern int _XMMcopy(unsigned long clen,
  132.                     int shan, unsigned long soff,
  133.                     int dhan, unsigned long doff);
  134. extern int _XMMicopy(unsigned long nelem, int elsize,
  135.                      unsigned int sskip, int shan, unsigned long soff,
  136.                      int dhan, unsigned long doff, unsigned int dskip);
  137.  
  138. extern int XMMrawcall(struct XMMregs *regs);
  139.  
  140. extern unsigned long UMBcoreleft(void);
  141. extern unsigned long UMBallcoreleft(void);
  142.  
  143. extern void far *UMBalloc(unsigned long bytes, unsigned long *finalsize);
  144. extern int UMBfree(void far *handle);
  145.  
  146. #endif
  147.